package common.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

public interface BaseMapper<T> {

	public void add(T t);

	public void update(T t);//全改

	public void updateBySelective(T t);//选择性改

	public void delete(Object id);

	public T queryById(Object id);//按id查询

	public int queryByCount(T t);//查询数量

	public List<T> queryByAllList(@Param("desc") String desc, T t);

	public List<T> queryByList(@Param("desc") String desc,
			@Param("start") Integer start, @Param("limit") Integer limit, T t);

//	public List<T> queryByListByPage(@Param("desc") String desc,
//			@Param("start") Integer start, @Param("limit") Integer limit, T t);

	public List<T> queryListByWhere(@Param("where") String where);
	
	public T queryByWhere(@Param("where") String where);

	public List<T> operateBySQL(@Param("sql") String sql);

	public int queryCountByWhere(@Param("where") String where);

	public void updateByWhere(@Param("where") String where);

}
